DEMO #2: We saw that range in a loop automatically counts up by 1.

We can use += to change values inside a loop by any amount.

  • Click Run to see the demo. Follow instructions on the stage to learn about +=.
  • Then, click Submit and Next to continue.


To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)